package com.alibaba.boot.netty.netty.http;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;

public class TestServerInit extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {


        ChannelPipeline channelPipeline = ch.pipeline();


        channelPipeline.addLast("MyHttpServerCodec",new HttpServerCodec());
        channelPipeline.addLast("myServerHanderl",new TestHttpServerHandler());

    }
}
